package com.workoutgrabber.ui.panels;

public enum ExerciseName {
	WEIGHT_EXERCISE("weight"),
	CARDIO_EXERCISE("cardio");
	
	private String name;
	
	ExerciseName(String name){
		this.name = name;
	}
	
	public String getName(){
		return name;
	}
	
	public static ExerciseName getValueOf(String name){
		if(name.equals(WEIGHT_EXERCISE.getName()))
			return WEIGHT_EXERCISE;
		
		if(name.equals(CARDIO_EXERCISE.getName()))
				return CARDIO_EXERCISE;
	
		return null;
	}
	
	public static String[] getAllNames(){
		String[] names = new String[ExerciseName.values().length];
		
		for (int i = 0; i < names.length; i++)
			names[i] = ExerciseName.values()[i].getName();
		
		return names;
	}
}
